//
//  TViewController.m
//  Test
//
//  Created by cjs on 2017/8/1.
//  Copyright © 2017年 dave. All rights reserved.
//

#import "TViewController.h"
#import <WebKit/WebKit.h>

@interface TViewController ()

@end

@implementation TViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"WKWebView";
    WKWebView *webView = [[WKWebView alloc] initWithFrame:self.view.bounds];
//    [webView loadRequest:[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://www.baidu.com"]]];
    [webView loadHTMLString:@"<!DOCTYPE html><html><head>	<title>测试页面</title><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"></head><body><a href=\"https://www.baidu.com\">跳转到百度</a></body></html>" baseURL:nil];
    [self.view addSubview:webView];
}



@end
